package com.dingreading.cloud.soms.mapper;

import com.dingreading.cloud.soms.dto.LeftLessonDto;
import com.dingreading.cloud.soms.dto.MaxFullNameDto;
import com.dingreading.cloud.soms.entity.Members;
import com.mybatisflex.core.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 映射层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface MembersMapper extends BaseMapper<Members> {

    List<Members> getCorpMembers(@Param("corpUid") String corpUid, @Param("storeUid") String storeUid, @Param("keyword") String keyword);

    List<Members> listByType(
            @Param("storeUid") String storeUid,
            @Param("keyword") String keyword,
            @Param("followStaffUid") String followStaffUid,
            @Param("grade") Integer grade,
            @Param("memberType") Integer memberType,
            @Param("customSource") String customSource,
            @Param("channelUid") String channelUid,
            @Param("time") String time,
            @Param("orderTypes") List<String> orderTypes
    );

    List<LeftLessonDto> serviceMemberByMemberUidList(
            @Param("storeUid") String storeUid, @Param("memberUidList") List<String> memberUidList,
            @Param("projectUid") String projectUid, @Param("tyProjectUid") String tyProjectUid
    );

    MaxFullNameDto maxFullName(@Param("fullName") String fullName);

    List<Members> findByMobAndFullName(@Param("storeUid") String storeUid, @Param("mob") String mob, @Param("fullName") String fullName);
}
